#include "client.hpp"


void Usage()
{
    std::cout<<"Usage: "<< "./client ip port"<<std::endl;
}

int main(int argc,char* argv[])
{
    if(argc!=3)
    {
        Usage();
        exit(1);
    }
    sockaddr_in server_addr;
    server_addr.sin_family = AF_INET;
    server_addr.sin_port = htons(atoi(argv[2]));
    server_addr.sin_addr.s_addr = inet_addr(argv[1]);
    client c;
    std::string msg;
    while(1)
    {
        std::cout<<"Please Enter# (less than " << MAXBUFSIZE << ")"<<std::endl;
        std::cin>>msg;
        c.SendTo(server_addr, msg);
    }
    return 0;
}



